#ifndef _SEARCH_H
#define _SEARCH_H

#include <regex.h>

#include "buffer.h"

typedef struct find_result {
    buf_t *buf;
    regmatch_t *match;
} find_result_t;

int find_start(const char *regex, buf_t *buf, int offset);
void find_finish(void);
find_result_t * find_next();
find_result_t * find_prev();

#endif /* _SEARCH_H */
